﻿<%@ Page Title="Achievement-oversigt" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ListAchievements.aspx.cs" Inherits="RLAWEB.ListAchievements" %>

<%@ Import Namespace="RLAWEB.RLAServiceReference" %>

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
    <style type="text/css">
        #achievement {
            border: 1px solid #ff8c00;
            background-color: #d3d3d3;
            margin-bottom: 5px;
            width: 500px;
        }

        .info {
            width: 120px;
            padding: 3px;
        }
    </style>

    <h2><%: Title %>.</h2>
    <h3>Her er listen over dine achievements.</h3>

    <asp:Repeater ID="achList" runat="server">
        <ItemTemplate>
            <table id="achievement">
                <tr>
                    <td class="info">
                        <b>Titel:</b>
                    </td>
                    <td>
                        <a href="<%# String.Format("/Achievement?ID={0}", Eval("AchievementId")) %>">
                            <asp:Label ID="lbTitle" runat="server" Text='<%# Eval("Title")%>'></asp:Label>
                        </a>
                    </td>
                </tr>
                <tr>
                    <td class="info">
                        <b>Beskrivelse:</b>
                    </td>
                    <td>
                        <asp:Label ID="gvlbDescription" runat="server" Text='<%# Eval("Description")%>'></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="info">
                        <b>Antal deltagere:</b>
                    </td>
                    <td>
                        <asp:Label ID="Label1" runat="server" Text='<%# ((List<User>)Eval( "Participants")).Count%>'></asp:Label>
                    </td>
                </tr>
            </table>
        </ItemTemplate>
    </asp:Repeater>
</asp:Content>